
const multer = require('multer')

const storage = multer.diskStorage({
    destination: function (req, file, cd) {
        cb(null, './public/uploads')

    },
    filename: function (req, file, cb) {
        cb(null, file.fieldname + '_' + Date.now())
    }
})
const upload = multer({ storage: storage })

module.exports = upload



